<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .transition-hover{
            width: 200px;
            height: 200px;
            background: url(/src/img/transition_pic/pic1.jpg) no-repeat center/cover;
            position: relative;
            overflow: hidden;
        }

        .transition-hover::after{
            width: 100%;
            height: 100%;
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            background-color: rgba(0, 0, 0, 0);
            transition: background-color .5s ease-in-out 0s;
        }

        .transition-hover:hover::after{
            background-color: rgba(0, 0, 0, .3);
        }

        .transition-hover p{
            position: absolute;
            width: 100%;
            height: 20px;
            left: 0;
            bottom: -20px;
            text-align: center;
            color: #fff;
            font-size: 16px;
            margin: 0;
            padding: 0;
            transition: bottom .5s ease-in-out 0s;
            z-index: 1;
        }

        .transition-hover:hover p{
            bottom: 5px;
        }
    </style>
</head>
<body>
    <div class="transition-hover">
        <p>上帝散落的光</p>
    </div>
</body>
</html>